<template>
    <div class="confiscationIndex">
        <navAndBanner></navAndBanner>
        <div class="img1">

        </div>
        <div style="height:1px;border-top:3px solid #ffcc00;width:76.4%;margin:0 auto;"></div>

        <main class="confiscationQueryContent">
            <template>
                <Table border :columns="columns7" :stripe="true" :data="data6" height="800"></Table>
            </template>
        </main>


        <div class="footer">
            <p>kqmts &copy 2015-2017 All Rights Reserved</p>
            <p>川ICP备16020686号</p>
        </div>
    </div>
</template>

<script>
    import navAndBanner from '../navAndBanner.vue'
    export default {
        components:{
                navAndBanner
            },
        name: "confiscationIndex",
        data() {
            return {
                columns7: [
                    {
                        title: '序列',
                        key: 'index',

                    },
                    {
                        title: '存酒卡号',
                        key: 'YSDH'
                    },
                    {
                        title: '客户名称',
                        key: 'KHMC'
                    },
                    {
                        title: '客户电话',
                        key: 'KHDH'
                    },
                    {
                        title: '录入时间',
                        key: 'LRSJ'
                    },
                    {
                        title: '类型',
                        key: 'LX'
                    },
                    {
                        title: '审核',
                        key: 'action',
                        width: 150,
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        marginRight: '5px'
                                    },
                                    on: {
                                        click: () => {
                                            this.show(params.index)
                                        }
                                    }
                                }, '点击审核')
                            ]);
                        }
                    }
                ],
                data6: [],
                userInfo:{}
            }
        },
        mounted() {
            this.userInfo = JSON.parse(sessionStorage.userinfo).data
            console.log(this.userInfo)
            let _this = this
            this.$http.post(`${this.URL}/api/ws/getConfiscationList`,
                { "token": _this.userInfo.token }
            ).then(function (res) {
                _this.data6 = res.data.data
                for (var i = 0; i < _this.data6.length; i++) {
                    _this.data6[i]["index"] = i + 1
                }

            })
        },
        methods: {
            show(index) {

                console.log(this.data6[index])
                this.$router.push({
                    path: "/chonggongFunc/confiscationexamine",
                    query: {
                        "DH": this.data6[index].DH
                    }
                })

            },
        }
    }

</script>

<style>
    .navAndBanner {
        background: linear-gradient(30deg, #b490ca, #5ebbe7);
        width: 100%;
        height: 120px;
        vertical-align: middle;
        padding-top: 40px
    }

    .img1 {
        background: url(../../assets/img/confiscationTitle1.png);
        width: 800px;
        height: 85px;
        margin: 0 auto;
        margin-top: 90px;
        margin-bottom: 80px;
        background-repeat: no-repeat;
    }

    a {
        text-decoration: none;
    }

    nav ul li {
        display: inline-block;
        vertical-align: middle;
        margin-right: 5%
    }

    nav ul li a {
        font-size: 24px;
        color: #999999;
    }

    nav ul li:first-child {
        margin-left: 13%;
        margin-right: 15%;
    }

    nav ul li:last-child {
        margin-top: 12px;
        float: right
    }
    /*内容*/

    .confiscationQueryContent {
        width: 70.8vw;
        margin: auto;
        margin-top: 2.6vw;
        height: auto;
    }
    /*尾部*/

    .footer {
        height: 125px;
        width: 100%;
        background: linear-gradient(30deg, #b490ca, #5ebbe7);
        text-align: center;
        vertical-align: middle;
        color: white;
        padding-top: 50px;
        margin-top: 125px
    }
</style>